//
//  XMNewUserDetailModel.m
//  XiaoMiao
//
//  Created by Jim huang on 2018/5/2.
//  Copyright © 2018年 smallyou. All rights reserved.
//

#import "XMNewPersonDetailModel.h"

@implementation XMNewPersonDetailModel


@end

@implementation XMNewPersonDetailExtrModel

-(BOOL)modelCustomTransformFromDictionary:(NSDictionary*)dic{
    
    NSString* material = [dic objectForKey:@"material"];
    self.material = material;
    
    NSString* position = [dic objectForKey:@"position"];
    self.position = position;
    
    
    NSString* project = [dic objectForKey:@"project"];
    self.project = project;
    
    
    NSString* extr = [dic objectForKey:@"extr"];
    self.extr = extr;
    if ([self.material isNotBlank]||[self.position isNotBlank]||[self.project isNotBlank]||[self.extr isNotBlank]) {
        self.hasSurgeryDetail = YES;
    }else{
        self.hasSurgeryDetail = NO;
    }
    


    return YES;
}

+(NSDictionary*)modelContainerPropertyGenericClass{
    
    return @{@"medicalHistoryView":[XMNewPersonDetailExtrMultipleModel class],@"physiologicalConditionView":[XMNewPersonDetailExtrMultipleModel class]};
    
}
@end


@implementation XMNewPersonDetailExtrMultipleModel

-(BOOL)modelCustomTransformFromDictionary:(NSDictionary*)dic{
    NSString* isSee = [dic objectForKey:@"isSee"];
    
    if ([isSee isEqualToString:@"1"]) {
        self.isSelected = YES;
    }else{
        self.isSelected = NO;
    }
    
    return YES;
}
@end


